import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'Home',
      component: () => import('../views/HomeView.vue'),
    },
    {
      path: '/about',
      name: 'About',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/Main',
      name: 'Main',
      component: () => import('../views/Main.vue'),
      children:[
        {
          path: '/List',
          name: 'List',
          component: () => import('../views/List.vue'),
        },
        {
          path: '/Detail',
          name: 'Detail',
          component: () => import('../views/Detail.vue'),
          props: true
        },
      ]
    },
    
  


  ],
})

export default router
